<?php
/**
 * @version		$Id: mod_vt_nivo_slider.php 2011-08-21 vinaora $
 * @package		VINAORA NIVO SLIDER
 * @subpackage	mod_vt_nivo_slider
 * @copyright	Copyright (C) 2011 VINAORA. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 * @website		http://vinaora.com
 * @twitter		http://twitter.com/vinaora
 * @facebook	http://facebook.com/vinaora
 */

// no direct access
defined('_JEXEC') or die;

// Require the base helper class only once
require_once dirname(__FILE__).DS.'helper.php';

$module_id	= $module->id;
$base_url	= JURI::base(true);

JHtml::stylesheet('media/mod_vt_nivo_slider/css/nivo-slider.css');

$layout = ltrim($params->get('layout', 'default'), '_:');
$theme = $params->get('theme', 'default');
modVT_Nivo_SliderHelper::addThemCSS($theme, $layout);

$source = $params->get('jquery_source', 'local');
$version = $params->get('jquery_version', '1.6.2');
modVT_Nivo_SliderHelper::addjQuery($source, $version);

JHtml::script('media/mod_vt_nivo_slider/js/jquery.nivo.slider.min.js');

$effect						= $params->get('effect');
$slices						= $params->get('slices');
$boxCols					= $params->get('boxCols');
$boxRows					= $params->get('boxRows');

$animSpeed					= intval($params->get('animSpeed'));
$pauseTime					= intval($params->get('pauseTime'));

$directionNav				= $params->get('directionNav');
$directionNavHide			= $params->get('directionNavHide');

$controlNav					= $params->get('controlNav');
$controlNavThumbs			= $params->get('controlNavThumbs');
$controlNavThumbsFromRel	= $params->get('controlNavThumbsFromRel');

$controlNavThumbsSearch		= trim($params->get('controlNavThumbsSearch'));
$controlNavThumbsSearch		= htmlspecialchars($controlNavThumbsSearch, ENT_QUOTES);
$controlNavThumbsReplace	= trim($params->get('controlNavThumbsReplace'));
$controlNavThumbsReplace	= htmlspecialchars($controlNavThumbsReplace, ENT_QUOTES);

$keyboardNav				= $params->get('keyboardNav');
$pauseOnHover				= $params->get('pauseOnHover');
$manualAdvance				= $params->get('manualAdvance');
$captionOpacity				= $params->get('captionOpacity') / 100;

$prevText					= htmlspecialchars($params->get('prevText'), ENT_QUOTES);
$nextText					= htmlspecialchars($params->get('nextText'), ENT_QUOTES);

$params->set('controlNavThumbsSearch', $controlNavThumbsSearch);
$params->set('controlNavThumbsReplace', $controlNavThumbsReplace);

$startSlide = modVT_Nivo_SliderHelper::getStartSlide($params);

$slider = modVT_Nivo_SliderHelper::getLinks($params);

$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'));

require JModuleHelper::getLayoutPath('mod_vt_nivo_slider', $params->get('layout', 'default'));
